using System;
using System.Collections.Generic;
using DeviceManager.Device;
using LoggingClient;

namespace DeviceManager.Kal
{
    [Trace]
    public abstract class KXDeviceImpl : DeviceImpl, IDisposable
    {
        private bool IsDisposed = false;

        public void OnDeviceError(int value)
        {
            OnDeviceError();
        }

        public void OnStatusChanged(string property, object oldValue, object newValue)
        {
            OnStatusChanged(property, newValue.ToString());
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool Diposing)
        {
            if (!IsDisposed)
            {
                if (Diposing)
                {

                }
            }

            IsDisposed = true;
        }

        ~KXDeviceImpl()
        {
            Dispose(false);
        }

    }
}
